package cn.wh.utils;

import java.io.IOException;
import java.util.Properties;

public class ProperUtils {
    private static Properties pss= new Properties();
    static {
        try {
            pss.load(ProperUtils.class.getClassLoader().getResourceAsStream("db.properties"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static String getProperty(String key){
        return pss.getProperty(key);
    }

    public static void main(String[] args) {
        System.out.println(getProperty("name"));
    }
}
